package com.fesine.ch02.t2_1;

/**
 * 多个对象多个锁
 * 运行结果线程安全，但打印顺序是异步的asynchronized
 * synchronized是对象锁
 * @Author: Fesine
 * @CreateDate:2016/6/27
 * @UpdateUser:修改人名称
 * @UpdateDate:2016/6/27
 * @UpdateRemark:修改具体的内容
 */
public class Run {
    public static void main(String[] args) {
        HasSelfPrivateNum numRef1 = new HasSelfPrivateNum();
        HasSelfPrivateNum numRef2 = new HasSelfPrivateNum();
        ThreadA threadA = new ThreadA(numRef1);
        threadA.start();
        ThreadB threadB = new ThreadB(numRef2);
        threadB.start();
    }

}
